﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A66标志枚举
{
    class Program
    {
        static void Main(string[] args)
        {
            MyFielInfo fileInfo = new MyFielInfo();
            fileInfo.fileProperty = FileProperty.red | FileProperty.write; //可读可写
            Console.WriteLine(fileInfo.fileProperty);
            
        }
    }
    class MyFielInfo //文件信息
    {
        public FileProperty fileProperty;
    }

    [Flags]
    enum FileProperty //标志枚举  每一个枚举值都是2的n次方数
    {
        red=1,//可读
        write=2,//可写
        hid=4,//隐藏
    }
}
